<%@ page contentType="text/html;charset=UTF-8" language="java" isELIgnored="false" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<html>
<head>
    <title>文件详情</title>
    <style type="text/css">
        #image {
            width: 250px;
            height: 250px;
        }
    </style>
    <link rel="stylesheet" href="${ctx}/static/layui/css/layui.css">
</head>
<body>


<div class="layui-layout layui-layout-admin">
    <%@ include file="/WEB-INF/commons/navbar.jsp" %>
    <%@ include file="/WEB-INF/commons/menu.jsp" %>

    <div class="layui-body">
        <!-- 内容主体区域 -->
        <div style="padding: 15px;">
            <div align="center">
                <a href="${ctx}/user/showAllFiles">返回</a><br><br>
            </div>
            <div align="center">
                <c:choose>
                    <c:when test="${fileItem.suffixName eq 'jpg'}">
                        <img src="${ctx}/upload/${fileItem.prefixName}" id="image">
                        <table>
                            <tr>
                                <td><span style="font-weight: bold;color: #0000FF">文件标题：</span></td>
                                <td>${fileItem.fileName}</td>
                            </tr>
                            <tr>
                                <td><span style="font-weight: bold;color: #0000FF">文件大小：</span></td>
                                <td><span style="color: red">${fileItem.fileSize}</span> KB</td>
                            </tr>
                            <tr>
                                <td><span style="font-weight: bold;color: #0000FF">文件类型：</span></td>
                                <td><span style="color: red">${fileItem.suffixName}</span> 格式</td>
                            </tr>
                            <tr>
                                <td><span style="font-weight: bold;color: #0000FF">下载次数：</span></td>
                                <td><span style="color: red">${fileItem.downloadCount}</span> 人次</td>
                            </tr>
                            <tr>
                                <td><span style="font-weight: bold;color: #0000FF">上传时间：</span></td>
                                <td>${fileItem.uploadTime} </td>
                            </tr>
                        </table>
                    </c:when>
                    <c:otherwise>
                        <table>
                            <tr>
                                <td><span style="font-weight: bold;color: #0000FF">文件标题：</span></td>
                                <td>${fileItem.fileName}</td>
                            </tr>
                            <tr>
                                <td><span style="font-weight: bold;color: #0000FF">文件大小：</span></td>
                                <td><span style="color: red">${fileItem.fileSize}</span> KB</td>
                            </tr>
                            <tr>
                                <td><span style="font-weight: bold;color: #0000FF">文件类型：</span></td>
                                <td><span style="color: red">${fileItem.suffixName}</span> 格式</td>
                            </tr>
                            <tr>
                                <td><span style="font-weight: bold;color: #0000FF">下载次数：</span></td>
                                <td><span style="color: red">${fileItem.downloadCount}</span> 人次</td>
                            </tr>
                            <tr>
                                <td><span style="font-weight: bold;color: #0000FF">上传时间：</span></td>
                                <td>${fileItem.uploadTime} </td>
                            </tr>
                        </table>

                    </c:otherwise>
                </c:choose>

            </div>

        </div>
    </div>
</div>



</body>
</html>
